home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Palettes / MiscTableScroll / MiscTableWell.M < prev    next >
Encoding:
Text File  |  1996-02-11  |  2.2 KB  |  67 lines

  1. //=============================================================================
  2. //
  3. //        Copyright (C) 1995 by Paul S. McCarthy and Eric Sunshine.
  4. //                Written by Paul S. McCarthy and Eric Sunshine.
  5. //                            All Rights Reserved.
  6. //
  7. //        This notice may not be removed from this source code.
  8. //
  9. //        This object is included in the MiscKit by permission from the authors
  10. //        and its use is governed by the MiscKit license, found in the file
  11. //        "License.rtf" in the MiscKit distribution.    Please refer to that file
  12. //        for a list of all applicable permissions and restrictions.
  13. //        
  14. //=============================================================================
  15. //-----------------------------------------------------------------------------
  16. // MiscTableWell.M
  17. //
  18. //        View class that draws a well where a column/row laid before dragging
  19. //        was started.
  20. //
  21. //-----------------------------------------------------------------------------
  22. //-----------------------------------------------------------------------------
  23. // $Id: MiscTableWell.M,v 1.1 95/09/27 12:21:21 zarnuk Exp $
  24. // $Log:        MiscTableWell.M,v $
  25. //    Revision 1.1  95/09/27    12:21:21  zarnuk
  26. //    Initial revision
  27. //    
  28. //-----------------------------------------------------------------------------
  29. #import "MiscTableWell.h"
  30.  
  31. extern "Objective-C" {
  32. #import <appkit/graphics.h>
  33. #import <dpsclient/wraps.h>
  34. }
  35.  
  36. @implementation MiscTableWell
  37.  
  38. //-----------------------------------------------------------------------------
  39. // - initFrame:
  40. //-----------------------------------------------------------------------------
  41. - initFrame: (NXRect const*) frameRect
  42.     {
  43.     [super initFrame:frameRect];
  44.     [self setOpaque:YES];
  45.     [self setClipping:NO];
  46.     return self;
  47.     }
  48.  
  49.  
  50. //-----------------------------------------------------------------------------
  51. // - drawSelf::
  52. //
  53. //        NOTE *1*: Should be filling 'rects' rather than 'bounds' but during
  54. //                auto-scrolling I found that drawing 'rects' only was
  55. //                insufficient.  It didn't fully cover the background as it
  56. //                should have.  I don't know why, currently.
  57. //-----------------------------------------------------------------------------
  58. - drawSelf: (NXRect const*) rects : (int) nrects
  59.     {
  60.     float const MED_GRAY = 0.5;
  61.     PSsetgray( MED_GRAY );
  62.     NXRectFill( &bounds );        // NOTE *1*
  63.     return self;
  64.     }
  65.  
  66. @end
  67.